Skip to content

Update rust toolchain to 1.91.1#8390

Closed
zetanumbers wants to merge 3 commits intoroc-lang:mainfrom
zetanumbers:this_is_why_you_should_update_your_compiler
Closed

Update rust toolchain to 1.91.1#8390
zetanumbers wants to merge 3 commits intoroc-lang:mainfrom
zetanumbers:this_is_why_you_should_update_your_compiler

Conversation

@zetanumbers
Copy link

Decreases rust's incremental compilation roughly by a factor of 3.

Specifically tests' build time with:

touch crates/compiler/parse/src/parser.rs # retrigger incremental compilation with zero changes
cargo build --tests

on i7-13700 decreases from 15.86s down to 5.42s.

Clean build time also decreased from 42.07s to 31.24s.

@Anton-4
Copy link
Collaborator

Anton-4 commented Nov 17, 2025

Hi @zetanumbers,
We've been hard at work on the new compiler written in zig (see src folder) so we have not upgraded the old compiler written in rust. I suspect it will take much more changes before you can get all of CI to pass. If you want to make those changes I will review them but we do not see substantial value in a rust upgrade of the old compiler. Sorry to disappoint!

@zetanumbers
Copy link
Author

After some testing I can say a large portion (16.05s -> 8.13s) of build time reduction was caused by rust switching to lld by default on x86_64 linux (rust-lang/rust#140525).

@Anton-4
Copy link
Collaborator

Anton-4 commented Nov 17, 2025

Oh yeah, we were using lld in some places but not everywhere I think. I would still prefer to avoid making the switch now, the old compiler had several flaky issues and changing things up here could make them worse

@zetanumbers
Copy link
Author

You should delete the old compiler code if it's not maintained.

@Anton-4
Copy link
Collaborator

Anton-4 commented Nov 19, 2025

The new compiler is still missing a lot of features, so we keep the old one around. We also still fix docs issues and other issues that are really bothering people. I just don't want to risk making the compiler or CI more flaky for a speedup that would mainly benefit compiler developers.

@github-actions
Copy link

Thank you for your contribution! Sometimes PRs end up staying open for a long time without activity, which can make the list of open PRs get long and time-consuming to review. To keep things manageable for reviewers, this bot automatically closes PRs that haven’t had activity in 60 days. This PR hasn’t had activity in 30 days, so it will be automatically closed if there is no more activity in the next 30 days. Keep in mind that PRs marked Closed are not deleted, so no matter what, the PR will still be right here in the repo. You can always access it and reopen it anytime you like!

@zetanumbers
Copy link
Author

I am gonna close this for now. Although I am still interested in old rust compiler as a case study of suboptimal incremental compilation performance on the rustc side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants